#!/bin/bash
###
 # Copyright (c) Soon.Liao 2024. All rights reserved.
 # @Author: soon.liao
 # @Date: 2024-11-23 08:42:39
 # @LastEditors: soon.liao
 # @LastEditTime: 2024-11-23 23:52:22
 # @FilePath: /near_link_sdk/applications/sample/wifi-iot/app/rgb_controller/build_rgb_controller_full.sh
 # @Description: Create Date : 2024
 # NA
### 
cd ../../../../../
rm -rf out
rm -f build_sk9822_server.log
rm -f build_paj7620u2_client.log
rm -rf applications/sample/wifi-iot/app/rgb_controller/fw/server/*.fwpkg
rm -rf applications/sample/wifi-iot/app/rgb_controller/fw/client/*.fwpkg

cp -f applications/sample/wifi-iot/app/rgb_controller/BUILD_server.gn applications/sample/wifi-iot/app/rgb_controller/BUILD.gn
hb set -p nearlink_dk_3863
hb build -f >> build_sk9822_server.log
cp -f out/nearlink_dk_3863/nearlink_dk_3863/ws63-liteos-app/ws63-liteos-app_all.fwpkg applications/sample/wifi-iot/app/rgb_controller/fw/server/paj7620u2-server-app_all.fwpkg
cp -f out/nearlink_dk_3863/nearlink_dk_3863/ws63-liteos-app/ws63-liteos-app_load_only.fwpkg applications/sample/wifi-iot/app/rgb_controller/fw/server/paj7620u2-server-app_load_only.fwpkg

rm -rf out
cp -f applications/sample/wifi-iot/app/rgb_controller/BUILD_client.gn applications/sample/wifi-iot/app/rgb_controller/BUILD.gn
hb set -p nearlink_dk_3863
hb build -f >> build_paj7620u2_client.log
cp -f out/nearlink_dk_3863/nearlink_dk_3863/ws63-liteos-app/ws63-liteos-app_all.fwpkg applications/sample/wifi-iot/app/rgb_controller/fw/client/sk9822-client-app_all.fwpkg
cp -f out/nearlink_dk_3863/nearlink_dk_3863/ws63-liteos-app/ws63-liteos-app_load_only.fwpkg applications/sample/wifi-iot/app/rgb_controller/fw/client/sk9822-client-app_load_only.fwpkg
